package rcs34.android.Namedays;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;

public class IOUtils {
  public static void closeQuietly(InputStream s) {
    if (null == s) {
      return;
    }
    try {
      s.close();
    } catch (IOException ioe) {
      // ignore exception
    }
  }

  public static void closeQuietly(BufferedReader s) {
    if (null == s) {
      return;
    }
    try {
      s.close();
    } catch (IOException ioe) {
      // ignore exception
    }
  }

  public static void closeQuietly(OutputStream s) {
    if (null == s) {
      return;
    }
    try {
      s.close();
    } catch (IOException ioe) {
      // ignore exception
    }
  }

  public static void closeQuietly(Socket s) {
    if (null == s) {
      return;
    }
    try {
      s.close();
    } catch (IOException ioe) {
      // ignore exception
    }
  }

}
